/*
 * Figures.h
 *
 *  Created on: 11-nov-2012
 *      Author: dna
 */

#ifndef FIGURES_H_
#define FIGURES_H_

//#ifndef _LINUX_GL_LIBRARIES
//#define _LINUX_GL_LIBRARIES

#include <GL/glut.h>    				// Header File For The GLUT Library
#include <GL/gl.h>						// Header File For The OpenGL32 Library
#include <GL/glu.h>						// Header File For The GLu32 Library

//#endif


#include <iostream>
#include <cstdio>

#define F_CUBE 6

typedef struct {
	GLfloat x, y, z;
	GLfloat u, v;
} F_VERTEX;

class Figures {
private:
	GLfloat cx,cy,cz,size;
	GLfloat xrot,yrot,zrot;
	int faces;
	int vertex_per_faces;

	F_VERTEX *vdata;

	/* methods */
	GLvoid drawFace(F_VERTEX v1, F_VERTEX v2, F_VERTEX v3, F_VERTEX v4);
	GLvoid drawFace(F_VERTEX v1, F_VERTEX v2, F_VERTEX v3);

	GLvoid fullVData(int n, GLfloat x, GLfloat y, GLfloat z, GLfloat u, GLfloat v);
	GLvoid setSignCube(int i, GLfloat *a, GLfloat *b, GLfloat *c);

public:
	Figures(int shape, GLfloat x, GLfloat y, GLfloat z, GLfloat size);
	virtual ~Figures();

	GLvoid draw();

	GLvoid increaseXrot(GLfloat value);
	GLvoid increaseYrot(GLfloat value);
	GLvoid increaseZrot(GLfloat value);

	GLvoid increaseXrot();
	GLvoid increaseYrot();
	GLvoid increaseZrot();

	GLvoid rotateX();
	GLvoid rotateY();
	GLvoid rotateZ();

};

#endif /* FIGURES_H_ */
